<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<title>{$name}</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
	<meta name="apple-mobile-web-app-capable" content="yes" />
	<meta name="apple-mobile-web-app-status-bar-style" content="black" />
	<meta name="format-detection" content="telephone=no" />
	<link href="{$Think.config.RESOURCEURL}wx_assets/css/iconfont/font_tuan.css{$Think.config.RESOURCE_VER}" rel="stylesheet">
	<link href="{$Think.config.RESOURCEURL}wx_assets/iconfont/iconfont.css{$Think.config.RESOURCE_VER}" rel="stylesheet">
	<link href="{$Think.config.RESOURCEURL}wx_assets/css/common.css{$Think.config.RESOURCE_VER}" rel="stylesheet" type="text/css">
	<link href="{$Think.config.RESOURCEURL}wx_assets/micontent/materiaDetail.css{$Think.config.RESOURCE_VER}" rel="stylesheet">
	<link href="{$Think.config.RESOURCEURL}wx_assets/micontent/emoji.css{$Think.config.RESOURCE_VER}" rel="stylesheet">
	<script type="text/javascript" src="{$Think.config.RESOURCEURL}wx_assets/js/zepto.1.1.3.min.js{$Think.config.RESOURCE_VER}"></script>
	<script type="text/javascript" src="{$Think.config.RESOURCEURL}wx_assets/js/zepto.alert.js{$Think.config.RESOURCE_VER}"></script>
	<script src="{$Think.config.RESOURCEURL}wx_assets/js/util.js{$Think.config.RESOURCE_VER}" type="text/javascript"></script>
	<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
	<link href="{$Think.config.RESOURCEURL}wx_assets/swiper/swiper.min.css{$Think.config.RESOURCE_VER}" rel="stylesheet" type="text/css">
	<script type="text/javascript" src="{$Think.config.RESOURCEURL}wx_assets/swiper/swiper.min.js{$Think.config.RESOURCE_VER}"></script>
	<script src="{$Think.config.RESOURCEURL}wx_assets/js/wx_share.js{$Think.config.RESOURCE_VER}" type="text/javascript"></script>
	<script type="text/javascript" src="{$Think.config.RESOURCEURL}wx_assets/js/product/product.js{$Think.config.RESOURCE_VER}"></script>

	<link href="{$Think.config.RESOURCEURL}wx_assets/js/area/mobiscroll.javascript.min.css{$Think.config.RESOURCE_VER}" rel="stylesheet" type="text/css">
	<script type="text/javascript" src="{$Think.config.RESOURCEURL}wx_assets/js/area/area_array.js{$Think.config.RESOURCE_VER}"></script>
	<script type="text/javascript" src="{$Think.config.RESOURCEURL}wx_assets/js/area/mobiscroll.javascript.min.js{$Think.config.RESOURCE_VER}"></script>
</head>
<body id="reward-info" style="padding: 0 !important; min-height: 100vh;">
	<!-- 基于线索 -->
	<if condition="$isClue eq 1">
		<!-- 已经获奖列表 -->
		<volist name="isClueJson.clueRewardRet" id="vo">
			<div class="card">
				<!-- 红包图片 -->
				<eq name="vo.clueRewardType" value="1">
					<img src="{$Think.config.RESOURCEURL}wx_assets/images/redMoney.png{$Think.config.RESOURCE_VER}" />
				</eq>
				<!-- 轮播图片 -->
				<neq name="vo.clueRewardType" value="1">
					<div class="swiper-container">
						<div class="swiper-wrapper">
							<volist name="vo.clueRewardImgs" id="url">
								<div class="swiper-slide"><img src="{$url}" /></div>
							</volist>
						</div>
						<!-- Add Pagination -->
						<div class="swiper-pagination" <elt name="vo.clueRewardImgs|count" value="1">style="opacity: 0;"</elt> ></div>
					</div>
				</neq>
				<div class="center-feild">
					<div class="title">
						<if condition="$vo.clueRewardType eq 1">现金红包<else />{$vo.clueGiftName}</if>
						<empty name="vo.clueGiftName">&nbsp;</empty>
						<span class="status" style="color: {$themeColor};">
							<if condition="$vo.status eq 0">待发放<else />已发放</if>
						</span>
					</div>
				</div>
				<div class="bottom-feild">
					<div class="rule">获奖规则：经过确认的有效填表用户</div>
					<div class="end-time">截止日期：{$vo.endTime}</div>
					<eq name="vo.clueRewardType" value="1"><div class="reward-name">红包：{$vo.clueRedMoney}元</div></eq>

					<!-- 状态按钮 -->
					<if condition="$vo.needSubmit eq 1">
						<!-- 需要提交信息 -->
						<a class="reward-btn" style="background: {$themeColor};" href="{$Think.config.SERVER_HOST}call.html?customerId={$customerId}&module=micontent&method=receiveReward&type={$vo.clueRewardType}&params=%7B%22id%22%3A{$vo.id}%2C%22moduleId%22%3A{$miContentId}%7D" >点击领取奖励</a>
					<elseif condition="$vo.clueRewardType eq 1" />
						<!-- 红包 -->
						<eq name="vo.status" value="0">
							<div class="reward-btn" style="background: {$themeColor}"><div class="btn-mask"></div>礼品正在发放中，请等待</div>
						</eq>
						<eq name="vo.status" value="1">
							<div class="reward-btn" style="background: {$themeColor};"><div class="btn-mask"></div>礼品已通过公众号发放成功，请及时领取！</div>
						</eq>
					<elseif condition="$vo.clueRewardType eq 2" />
						<!-- 实物 -->
						<eq name="vo.status" value="0">
							<div class="reward-btn" style="background: {$themeColor};"><div class="btn-mask"></div>礼品正在发放中，请等待</div>
						</eq>
						<eq name="vo.status" value="1">
							<div class="reward-btn" style="background: {$themeColor};"><div class="btn-mask"></div>礼品已通过快递寄送，请注意查收</div>
						</eq>
					<elseif condition="$vo.clueRewardType eq 3" />
						<!-- 虚拟 -->
						<eq name="vo.status" value="0">
							<div class="reward-btn" style="background: {$themeColor};"><div class="btn-mask"></div>礼品正在发放中，请等待</div>
						</eq>
						<eq name="vo.status" value="1">
							<div class="reward-btn" style="background: {$themeColor};"><div class="btn-mask"></div>礼品已发放，请保持手机号码畅通！</div>
						</eq>
					<else />
						<div class="reward-btn" style="background: {$themeColor};"><div class="btn-mask"></div>状态错误！</div>
					</if>

				</div>
			</div>
		</volist>
		<!-- 还有剩余奖励时显示 -->
		<gt name="isClueJson.clueShareRemainder" value="0">
			<div class="card">
				<eq name="isClueJson.clueRewardType" value="1">
					<img src="{$Think.config.RESOURCEURL}wx_assets/images/redMoney.png{$Think.config.RESOURCE_VER}" />
				</eq>
				<neq name="isClueJson.clueRewardType" value="1">
					<div class="swiper-container">
						<div class="swiper-wrapper">
							<volist name="isClueJson.clueRewardImgs" id="url">
								<div class="swiper-slide"><img src="{$url}" /></div>
							</volist>
						</div>
						<!-- Add Pagination -->
						<div class="swiper-pagination" <elt name="isClueJson.clueRewardImgs|count" value="1">style="opacity: 0;"</elt> ></div>
					</div>
				</neq>
				<div class="center-feild">
					<div class="title">
						<if condition="$isClueJson.clueRewardType eq 1">现金红包<else />{$clueGiftName}</if>
						<span class="status"></span>
					</div>
				</div>
				<div class="bottom-feild">
					<div class="rule">获奖规则：经过确认的有效填表用户<span class="count">剩余份数：{$isClueJson.clueShareRemainder}</span></div>
					<div class="end-time">截止日期：{$endTime}</div>
					<eq name="isClueJson.clueRewardType" value="1"><div class="reward-name">红包：{$clueRedMoney}元</div></eq>
				</div>
			</div>
		</gt>
  </if>

	<!-- 基于分享浏览人数 -->
	<if condition="$isShare eq 1">
		<volist name="isShareJson" id="vo">
			<div class="card">
				<!-- 红包图 -->
				<eq name="vo.rewardType" value="1">
					<img src="{$Think.config.RESOURCEURL}wx_assets/images/redMoney.png{$Think.config.RESOURCE_VER}" />
				</eq>
				<!-- 轮播图 -->
				<neq name="vo.rewardType" value="1">
					<div class="swiper-container">
						<div class="swiper-wrapper">
							<volist name="vo.rewardImgs" id="url">
								<div class="swiper-slide"><img src="{$url}" /></div>
							</volist>
						</div>
						<!-- Add Pagination -->
						<div class="swiper-pagination" <elt name="vo.rewardImgs|count" value="1">style="opacity: 0;"</elt> ></div>

					</div>
				</neq>
				<!-- 中间部分 -->
				<div class="center-feild">
					<div class="title">
						<div>
							<if condition="$vo.rewardType eq 1">现金红包<else />{$vo.clueGiftName}</if>
						</div>
						<notempty name="vo.shareRewardRet">
							<span class="status" style="color: {$themeColor};">
								<eq name="vo.shareRewardRet.status" value="0">待发放</eq>
								<eq name="vo.shareRewardRet.status" value="1">已发放</eq>
							</span>
						</notempty>
					</div>

				</div>
				<!-- 下面部分 -->
				<div class="bottom-feild">
					<div class="rule">获奖规则：浏览人数达标满{$vo.visitCount}人
						<!-- 未获得时显示剩余份数 -->
						<empty name="vo.shareRewardRet">
							<if condition="$vo.shareRemainder gt 0" ><span class="count">剩余份数：{$vo.shareRemainder}</span></if>
						</empty>
					</div>
					<div class="end-time">
						截止日期：
						<notempty name="vo.endTime">{$vo.endTime}</notempty>
						<empty name="vo.endTime">{$endTime}</empty>
					</div>
					<eq name="vo.rewardType" value="1"><div class="reward-name">红包：{$vo.redMoney}元</div></eq>
					<notempty name="vo.shareRewardRet">
						<!-- 状态按钮 -->
						<if condition="$vo.needSubmit eq 1">
							<!-- 需要提交信息 -->
							<a class="reward-btn" style="background: {$themeColor};" href="{$Think.config.SERVER_HOST}call.html?customerId={$customerId}&module=micontent&method=receiveReward&type={$vo.rewardType}&params=%7B%22id%22%3A{$vo.shareRewardRet.id}%2C%22moduleId%22%3A{$miContentId}%7D" >点击领取奖励</a>
						<elseif condition="$vo.rewardType eq 1" />
							<!-- 红包 -->
							<eq name="vo.shareRewardRet.status" value="0">
								<div class="reward-btn" style="background: {$themeColor};"><div class="btn-mask"></div>红包正在发放中，请等待</div>
							</eq>
							<eq name="vo.shareRewardRet.status" value="1">
								<div class="reward-btn" style="background: {$themeColor};"><div class="btn-mask"></div>红包已通过公众号发放成功，请及时领取！</div>
							</eq>
						<elseif condition="$vo.rewardType eq 2" />
							<!-- 实物 -->
							<eq name="vo.shareRewardRet.status" value="0">
								<div class="reward-btn" style="background: {$themeColor};"><div class="btn-mask"></div>礼品正在发放中，请等待</div>
							</eq>
							<eq name="vo.shareRewardRet.status" value="1">
								<div class="reward-btn" style="background: {$themeColor};"><div class="btn-mask"></div>礼品已通过快递寄送，请注意查收</div>
							</eq>
						<elseif condition="$vo.rewardType eq 3" />
							<!-- 虚拟 -->
							<eq name="vo.shareRewardRet.status" value="0">
								<div class="reward-btn" style="background: {$themeColor};"><div class="btn-mask"></div>礼品正在发放中，请等待</div>
							</eq>
							<eq name="vo.shareRewardRet.status" value="1">
								<div class="reward-btn" style="background: {$themeColor};"><div class="btn-mask"></div>礼品已发放，请保持手机号码畅通！</div>
							</eq>
						<else />
							<div class="reward-btn" style="background: {$themeColor};"><div class="btn-mask"></div>状态错误！</div>
						</if>
					</notempty>
				</div>
			</div>
		</volist>
	</if>
<script>

	function Page () {}

	$.extend(Page.prototype, {
		init: function() {
      this.bindEvents();
			this.initSwiper();
			if (sessionStorage.getItem('refresh') == 'true') {
				sessionStorage.setItem('refresh', 'false');
				location.reload();
			}
    },

		bindEvents: function() {

    },

		initSwiper: function() {
			var swiper = new Swiper('.swiper-container', {
	      pagination: {
	        el: '.swiper-pagination',
	      },
	    });
		},
	})

	var page = new Page();
	page.init();
</script>
</body>
</html>
